def pop_kwargs(kwargs: dict, kw: str, default=None):
    return kwargs.pop(kw) if kw in kwargs else default


def push_kwargs(dst: dict, src: dict):
    for k, v in src.items():
        if v:
            dst.update({k: v})


def validate_str(elems):
    def justify(x):
        return x and not str(x).isspace()

    if type(elems) == str:
        return justify(elems)
    else:
        for e in elems:
            if justify(e):
                return True

    return False
